package com.itheima;


import com.itheima.service.AccountService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


@RunWith(SpringJUnit4ClassRunner.class)
        //设置上下文配置
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class Demo {
         //设置自动装配业务层对象
    @Autowired
    private AccountService accountService;

    @Test
    public void Transfer(){
        accountService.transfer("sb1","sb2",100d);
    }

    @Test
    public void outUpdate(){
        accountService.outUpdate("sb1",100d);
    }
}
